package cloud.demarcia.rabbitregister.enums;

/**
 * @author Bojun Wen, wen_bj@outlook.com
 * @date 2022.02.18
 */
public enum RegisterStatusCode {
    SUCCESS(200,"注册成功"),
    SYSTEM_ERROR(499,"系统错误"),
    ALREADY_REGISTERED(611,"已经注册过，无需注册"),
    CODE_ERROR(612,"验证码错误或已过期"),
    USERNAME_EXISTS(613,"用户名重复"),
    EMAIL_EXISTS(614,"邮箱地址已经被注册"),
    EMAIL_INVALID(615,"邮箱地址格式错误"),
    USERNAME_INVALID(616,"用户名格式错误"),
    TOO_FREQUENT(617,"验证码发送频繁，请稍后再试");

    private Integer code;
    private String message;

    RegisterStatusCode(Integer code, String message) {
        this.code = code;
        this.message = message;
    }

    public Integer getCode() {
        return code;
    }

    public void setCode(Integer code) {
        this.code = code;
    }

    public String getMessage() {
        return message;
    }

    public void setMessage(String message) {
        this.message = message;
    }
}
